﻿using StudentProject.DAL;
using StudentProject.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StudentProject.BLL
{
    public class ClassesSerivce
    {
        ClassesServiceDal dal = new ClassesServiceDal();
        //查询数据并显示在DGVClasses中
        public List<View_ClassesMajor> GetList()
        {
            return dal.GetLsit();
        }

        //添加数据
        public bool AddClassesInfo(Classes classes)
        {
            return dal.AddClassesInfo(classes) > 0;
        }

        //显示数据（修改）
        public View_ClassesMajor LoadClasses(string pid)
        {
            return dal.LoadClasses(pid);
        }

        //修改数据
        public bool UpdateClassesInfo(Classes classes)
        {
            return dal.UpdateClassesInfo(classes)>0;
        }

        //删除数据
        public bool RemoveClasses(string pid)
        {
            return dal.RemoveClasses(pid) > 0;
        }
    }
}
